import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: resolve => require(['../pages/Login.vue'],resolve),
    
  },
  {
    path: '/home',
    component: resolve => require(['../components/Home.vue'],resolve),
    children:[
      {
        //默认进入
        path: '/',
        component: resolve => require(['../pages/data/sale-dis.vue'],resolve)
      },
      {
        path: '/sale-dis',
        component: resolve => require(['../pages/data/sale-dis.vue'],resolve)
      },
      {
        path: '/sale-pro',
        component: resolve => require(['../pages/data/sale-pro.vue'],resolve)
      },
      {
        path: '/sale-city',
        component: resolve => require(['../pages/data/sale-city.vue'],resolve)
      },
      {
        path: '/sale-area',
        component: resolve => require(['../pages/data/sale-area.vue'],resolve)
      },
      {
        path: '/sale-pro-act',
        component: resolve => require(['../pages/data/sale-pro-act.vue'],resolve)
      },
      {
        path: '/sale-city-act',
        component: resolve => require(['../pages/data/sale-city-act.vue'],resolve)
      },
      {
        path: '/sale-area-act',
        component: resolve => require(['../pages/data/sale-area-act.vue'],resolve)
      },
      {
        path: '/Card',
        component: resolve => require(['../pages/card/Card.vue'],resolve)
      },
      {
        path: '/walletList',
        component: resolve => require(['../pages/finance/walletList.vue'],resolve)
      },
      {
        path: '/orderList',
        component: resolve => require(['../pages/finance/orderList.vue'],resolve)
      },
      {
        path: '/reviewOrderList',
        component: resolve => require(['../pages/finance/reviewOrderList.vue'],resolve)
      },
      {
        path: '/manifestList',
        component: resolve => require(['../pages/finance/manifestList.vue'],resolve)
      },
      {
        path: '/role',
        component: resolve => require(['../pages/system/role.vue'],resolve)
      },
      {
        path: '/permission',
        component: resolve => require(['../pages/system/permission.vue'],resolve)
      },
      {
        path: '/menu',
        component: resolve => require(['../pages/system/menu.vue'],resolve)
      },
      {
        path: '/user',
        component: resolve => require(['../pages/system/user.vue'],resolve)
      },
      {
        path: '/CustomerList',
        component: resolve => require(['../pages/customer/CustomerList.vue'],resolve)
      },
      {
        path: '/CustomerSet',
        component: resolve => require(['../pages/customer/CustomerSet.vue'],resolve)
      },
      {
        path: '/CustomerOrderList',
        component: resolve => require(['../pages/customer/CustomerOrderList.vue'],resolve)
      }
    ]
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
